# 这个是cmake最小版本要求
cmake_minimum_required(VERSION 3.1)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")

# 填写你的项目名称Project
project(thread-safe-stl-containers)
set(TARGET "thread-safe-stl-containers")

add_definitions(
    -DUSE_THREAD_SAFE_CONTAINERS
)

# 源程序
aux_source_directory(${CMAKE_SOURCE_DIR} DIR_SRCS)
aux_source_directory(${CMAKE_SOURCE_DIR}/src DIR_SRCS)
aux_source_directory(${CMAKE_SOURCE_DIR}/test DIR_SRCS)


# 头文件
include_directories(
    ${CMAKE_SOURCE_DIR}
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/test
)

add_executable(${TARGET} ${DIR_SRCS})

target_link_libraries(${TARGET}
    pthread
    )

